{template 'header',$module}
{if $action == 'payword'}
<div class="main-block bd-gray mt10">
<table cellpadding="0" cellspacing="0">
	<tr>
		<td class="tab_on" id="Tab0"><a href="?action={$action}"><span>1、设置新密码</span></a></td>
		<td class="tab_nav">&nbsp;</td>
		<td class="tab" id="Tab1"><a href="?action={$action}"><span>2、邮件验证</span></a></td>
	</tr>
</table>
<form method="post" action="send.php" onsubmit="return check();" id="dform">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 新支付密码</th>
			<td class="tr"><input type="password" size="20" name="password" id="password"/> <span id="dpassword" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 重复新支付密码</th>
			<td class="tr"><input type="password" size="20" name="cpassword" id="cpassword"/>&nbsp;<span id="dcpassword" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 验证码</th>
			<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90">提示信息</th>
			<td class="tr">提交后，系统将发送一封验证邮件至{$_email}，请接收邮件完成验证</td>
		</tr>
		</tbody>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="30"><input type="submit" name="submit" value=" 下一步 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>
<script type="text/javascript">
	function check() {
		if ( Dd('password').value.length > {$MOD[maxpassword]} || Dd('password').value.length < {$MOD[minpassword]} ) {
			Dmsg('密码长度应为{$MOD[minpassword]}-{$MOD[maxpassword]}字符', 'password');
			return false;
		}
		if ( Dd('password').value != Dd('cpassword').value ) {
			Dmsg('两次输入的密码不一致', 'cpassword');
			return false;
		}
		if ( !is_captcha(Dd('captcha').value) ) {
			Dmsg('请填写正确的验证码', 'captcha');
			return false;
		}
		return true;
	}
</script>
{elseif $action == 'email'}
<div class="main-block bd-gray mt10">
<div class="hd fn-clear">
	<h2 class="fn-left">修改Email</h2>
</div>
<ul id="data-nav" class="main-nav mt10 fn-clear">
	<li id="status_0"><a href="?action={$action}"><span>1、设置新Email</span></a></li>
	<li id="status_1"><a href="?action={$action}"><span>2、邮件验证</span></a></li>
	<li id="status_2"><a href="?action={$action}"><span>3、修改成功</span></a></li>
</ul>
<form method="post" action="send.php" id="pub-form">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 新Email地址</th>
			<td class="tr"><input type="text" size="30" name="email" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'email',missingMessage:'请填写新Email地址'"/> <span id="demail" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 验证码</th>
			<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90">提示信息</th>
			<td class="tr">提交后，系统将发送一封验证邮件至新Email地址，请接收邮件完成验证</td>
		</tr>
		</tbody>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="30">
				<button type="submit" class="btn">下一步</button>
				&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>
<script>
	seajs.use(['member'], function(member){
		member.active('menu_general', 'edit_1', 'status_{$status}')
	})
</script>
{elseif $action == 'mobile'}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href="?action={$action}"><span>1、设置新手机</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab1"><a href="?action={$action}&code=1"><span>2、接收认证码</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab2"><a href="?action={$action}"><span>3、修改成功</span></a></td>
		</tr>
	</table>
</div>
{if isset($code)}
<form method="post" action="send.php" onsubmit="return check();" id="dform">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 认证码</th>
			<td class="tr"><input type="text" size="10" name="auth" id="auth"/> <span id="dauth" class="cred"></span> 请输入你收到的短信认证码</td>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="30"><input type="submit" value=" 下一步 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 重 发 " class="btn" onclick="Go('?action={$action}');"/></td>
		</tr>
	</table>
</form>
<script type="text/javascript">
	Dd('Tab0').className = 'tab';
	Dd('Tab1').className = 'tab_on';
	function check() {
		if ( Dd('auth').value.length < 6 ) {
			Dmsg('请填写认证码', 'auth');
			return false;
		}
		return true;
	}
</script>
{else}
<form method="post" action="send.php" onsubmit="return check();" id="dform">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 新手机号</th>
			<td class="tr"><input type="text" size="30" name="mobile" id="mobile" value=""/> <span id="dmobile" class="cred"></span></td>
		</tr>
		{if $fee && $_sms<1}
		<tr>
			<th width="90">接收短信收费</th>
			<td class="tr"><span class="f_b cred">{$fee}</span> {$DT[money_unit]}</td>
		</tr>
		<tr>
			<th width="90">帐户余额</th>
			<td class="tr"><span class="f_b f_blue">{$_money}</span> {$DT[money_unit]} {if $fee>$_money}&nbsp;<span class="cred">余额不足</span>&nbsp;{/if} <a href="{$MODULE[2][linkurl]}charge.php?action=pay" class="t" target="_blank">[充值]</a></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 支付密码</th>
			<td class="tr">{template 'password', 'chip'} <span id="dpassword" class="cred"></span></td>
		</tr>
		{/if}
		<tr>
			<th width="90">提示信息</th>
			<td class="tr">提交后，系统将发送一条短信至您的手机号码，请注意接收</td>
		</tr>
		</tbody>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="30"><input type="submit" name="submit" value=" 下一步 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>
<script type="text/javascript">
	function check() {
		if ( Dd('mobile').value.length < 7 ) {
			Dmsg('请填写手机号码', 'mobile');
			return false;
		}
		{if $fee && $_sms < 1}
		if ( Dd('password').value.length < 6 ) {
			Dmsg('请填写支付密码', 'password');
			return false;
		}
		{/if}
		return true;
	}
</script>
{/if}
{elseif $action == 'check'}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href="?action={$action}"><span>1、重发验证信</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab1"><a href="?action={$action}"><span>2、邮件验证</span></a></td>
		</tr>
	</table>
</div>
<form method="post" action="send.php" onsubmit="return check();" id="dform">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 户 名</th>
			<td class="tr"><input type="username" name="username" id="username" value="{$_username}" style="width:140px"/> <span id="dusername" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 密 码</th>
			<td class="tr">{template 'password', 'chip'} <span id="dpassword" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90">Email</th>
			<td class="tr"><input type="text" size="30" name="email" id="email"/> <span id="demail" class="cred"></span><br/>
				<span class="f_gray">如果需要更换注册Email，请填写；如果不更换，请留空</span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 验证码</th>
			<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90">提示信息</th>
			<td class="tr">提交后，系统将发送一封验证邮件至您的注册Email，请接收邮件完成验证</td>
		</tr>
		</tbody>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="30"><input type="submit" name="submit" value=" 下一步 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>
<script type="text/javascript">
	function check() {
		if ( Dd('username').value.length < 1 ) {
			Dmsg('请填写用户名', 'username');
			return false;
		}
		if ( Dd('password').value.length < 6 ) {
			Dmsg('请填写密码', 'password');
			return false;
		}
		if ( !is_captcha(Dd('captcha').value) ) {
			Dmsg('请填写正确的验证码', 'captcha');
			return false;
		}
		return true;
	}
</script>
{else}
<div class="main-block bd-gray mt10">
	<div class="hd fn-clear">
		<h2 class="fn-left">找回密码</h2>
	</div>
	<ul id="data-nav" class="main-nav mt10 fn-clear">
		<li><a href="?action={$action}"><span>1、找回密码</span></a></li>
		<li><a href="?action={$action}"><span>2、邮件验证</span></a></li>
	</ul>
	<form method="post" action="send.php" id="pub-form">
		<input type="hidden" name="action" value="{$action}"/>
		<table class="data-form">
			<tr>
				<th class="tl"><span class="cred">*</span>
					<select name="option">
						<option value="username">用户名</option>
						{if $MOD['passport']}
						<option value="passport">通行证</option>
						{/if}
						<option value="mobile">手机号</option>
						<option value="company">企业名</option>
						{if $DT[im_qq]}
						<option value="qq">QQ</option>
						{/if}
						{if $DT[im_msn]}
						<option value="msn">MSN</option>
						{/if}
						{if $DT[im_ali]}
						<option value="ali">旺旺</option>
						{/if}
						{if $DT[im_skype]}
						<option value="skype">Skype</option>
						{/if}
						<option value="userid">会员ID</option>
					</select>
				</th>
				<td class="tr"><input type="username" size="20" name="username" class="graybd-ipt easyui-validatebox" data-options="required:true,missingMessage:'请填写名称'"/></td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> Email</th>
				<td class="tr"><input type="text" size="30" name="email" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'email',missingMessage:'请填写email地址'"/> <span id="demail" class="cred"></span> <span class="f_gray">请填写您注册时填写的Email</span></td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 新登录密码</th>
				<td class="tr"><input type="password" size="20" name="password" id='password' class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[6,20]',invalidMessage:'登录密码长度应在6-20之间',missingMessage:'请填写新登录密码'"/> <span id="dpassword" class="cred"></span></td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 重复密码</th>
				<td class="tr"><input type="password" size="20" name="cpassword" id="cpassword" class="graybd-ipt easyui-validatebox"/>&nbsp;<span id="dcpassword" class="cred"></span></td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 验证码</th>
				<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="cred"></span></td>
			</tr>
			<tr>
				<th width="90">提示信息</th>
				<td class="tr">提交后，系统将发送一封验证邮件至您的注册Email，请接收邮件完成验证</td>
			</tr>
			</tbody>
			<tr>
				<th width="90">&nbsp;</th>
				<td class="tr" height="30">
					<button type="submit" class="btn" name="submit">下一步</button>
					&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/>
				</td>
			</tr>
		</table>
	</form>
	{/if}
	<script type="text/javascript">
		seajs.use(['$', 'easyui', 'easyui-css'], function ($) {
			$('#pub-form').on('submit', function () {
				return $('#pub-form').form('validate');
			});
			$('#cpassword').validatebox({
				required : true,
				validType : 'is_same["value","#password","两次输入的密码应该相同"]',
				missingMessage : '请重复输入密码'
			});
		});
	</script>
</div>
{template 'footer',$module}